package com.asset.manager.act.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * activiti 流程变量
 */
@Component @NoArgsConstructor
public class ActivitiProcessVal implements Serializable {

    /**
     * 预算金额
     */
    @Getter @Setter
    private Double amount;

    /**
     * 审批意见
     */
    @Getter @Setter
    private String msg;

    /**
     * 状态(1:草稿 2:审批中 3:通过 4:驳回 5:废弃 6:失败)
     */
    @Getter @Setter
    public static Integer status;

    // 申请成功
    public void success() {
        status = 3;
    }
    // 申请失败
    public void failure() {
        status = 6;
    }

    private static final long serialVersionUID = 1L;
}
